<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台（PHP版）
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码，建议反馈是我们前进的动力
// | 开源版本可自由商用，可去除界面版权logo
// | gitee下载：https://gitee.com/likeshop_gitee/likeadmin
// | github下载：https://github.com/likeshop-github/likeadmin
// | 访问官网：https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------

namespace app\adminapi\validate\promotion;


use app\common\validate\BaseValidate;


/**
 * PromotionLink验证器
 * Class PromotionLinkValidate
 * @package app\adminapi\validate
 */
class PromotionLinkValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'platform' => 'require',
        'name' => 'require',
        'paytype' => 'require',
        'egold' => 'require',
        'add_desktop_id' => 'require',
        'recharge_template_id' => 'require',
        'book_id' => 'require',
        'book_name' => 'require',
        'chapter_id' => 'require',
        'chapter_name' => 'require',
        'media' => 'require',
        'audit_mode' => 'require',
        'media_feedback' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'id' => 'id',
        'platform' => '快应用ID 0平台',
        'name' => '推广链名称',
        'paytype' => '定价类型 1千字 2章节',
        'egold' => '价格',
        'add_desktop_id' => '加桌ID',
        'recharge_template_id' => '充值模板ID',
        'book_id' => '书籍ID',
        'book_name' => '书籍名称',
        'chapter_id' => '章节ID',
        'chapter_name' => '章节名称',
        'media' => '媒体 1巨量',
        'audit_mode' => '审核模式 1开启 0关闭',
        'media_feedback' => '媒体回传 1开启 0关闭',
    ];


    /**
     * @notes 添加场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneAdd()
    {
        return $this->only(['platform','name','paytype','egold','add_desktop_id','recharge_template_id','book_id','book_name','chapter_id','chapter_name','media','audit_mode','media_feedback']);
    }


    /**
     * @notes 编辑场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneEdit()
    {
        return $this->only(['id','paytype','egold','add_desktop_id','recharge_template_id','audit_mode']);
    }


    /**
     * @notes 删除场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }


    /**
     * @notes 详情场景
     * @return PromotionLinkValidate
     * @author likeadmin
     * @date 2024/03/04 19:26
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}
